Added -u flag (unsafe) to runtest.sh, to skip the sanity checks. This improves
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 10:39:09 +0000 (11:39 +0100)
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>
Tue, 21 Mar 2006 10:39:09 +0000 (11:39 +0100)
turnaround when developing tests.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xm-test/runtest.sh

index 2cedec6440d50a668b975408f39eec216b860652..9e11824b8073221fa0ad4867852df41bb5f9e223 100755 (executable)
@@ -15,6 +15,7 @@ usage() {
     echo "  -e <email>  : set email address for report"
     echo "  -r <url>    : url of test results repository to use"
     echo "  -s <report> : just submit report <report>"
+    echo "  -u          : unsafe -- do not run the sanity checks before starting"
     echo "  -h | --help : show this help"
 }
 
@@ -193,6 +194,7 @@ report=yes
 reportserver=${xmtest_repo:-'http://xmtest.dague.org/cgi-bin/report-results'}
 batch=no
 run=yes
+unsafe=no
 GROUPENTERED=default
 
 # Resolve options
@@ -227,6 +229,11 @@ while [ $# -gt 0 ]
       -s)
          run=no
          ;;
+      -u)
+         echo "(Unsafe mode)"
+         unsafe=yes
+         report=no
+         ;;
       -h|--help)
           usage
           exit 0
@@ -275,15 +282,20 @@ if [ "$GROUPENTERED" != "default" ]; then
 fi
 
 if [ "$run" != "no" ]; then
-    runnable_tests
+    if [ "$unsafe" = "no" ]; then
+      runnable_tests
+    fi
     rm -f $REPORT"*"
-    make_environment_report $OSREPORTTEMP $PROGREPORTTEMP
+    if [ "$unsafe" = "no" ]; then
+      make_environment_report $OSREPORTTEMP $PROGREPORTTEMP
+    fi
     run_tests $GROUPENTERED $OUTPUT
     make_text_reports $PASSFAIL $FAILURES $OUTPUT $TXTREPORT
-    make_result_report $OUTPUT $RESULTREPORTTEMP
-    cat $OSREPORTTEMP $PROGREPORTTEMP $RESULTREPORTTEMP > $XMLREPORT
-    rm $OSREPORTTEMP $PROGREPORTTEMP $RESULTREPORTTEMP
-
+    if [ "$unsafe" = "no" ]; then
+      make_result_report $OUTPUT $RESULTREPORTTEMP
+      cat $OSREPORTTEMP $PROGREPORTTEMP $RESULTREPORTTEMP > $XMLREPORT
+      rm $OSREPORTTEMP $PROGREPORTTEMP $RESULTREPORTTEMP
+    fi
 fi
 
 if [ "$report" = "yes" ]; then